import Vue from 'vue'
import App from './App'
import router from '@/common/router'
import store from '@/common/store'
import tools from '@/common/utils/tools'
import uView from '@/uni_modules/uview-ui'

import {RouterMount} from 'uni-simple-router'
import api from '@/common/request/index'

Vue.prototype.$store = store
Vue.prototype.$api = api;
Vue.prototype.$tools = tools;

// 工具
import '@/plugins/utils.js';
//权限配置中心
import base from '@/config/baseUrl'
//判断是否登录
import { judgeLogin } from '@/config/login';
Vue.prototype.judgeLogin = judgeLogin;

// ..加载动画....
//import ourLoading from '@/components/our-loading/our-loading.vue'
//Vue.component('ourLoading', ourLoading)
// ......

import publicModule from "@/components/common/public-module.vue";
Vue.component("public-module", publicModule);


// #ifdef MP
// 引入uView对小程序分享的mixin封装
const mpShare = require('@/uni_modules/uview-ui/libs/mixin/mpShare.js')
Vue.mixin(mpShare)
// #endif
// #ifdef H5
//微信公众号(分享、扫码、获取位置等)
import '@/plugins/jwxUtils.js';
// #endif

Vue.config.productionTip = false
App.mpType = 'app'
Vue.use(uView)


const app = new Vue({
    store,
    ...App
})
 

// #ifdef H5
	RouterMount(app,'#app');
// #endif

// #ifndef H5
	app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif
